package com.xms.sdk.core.query;

/**
 * <p>
 * DateGroupingType
 * </p>
 *
 * @author migo
 * @since 2021/9/1
 */
public enum DateGroupingType {
    YEAR(0, "YEAR"),
    MONTH(1, "MONTH"),
    DAY(2, "DAY"),
    QUARTER(3, "QUARTER"),
    WEEK(4, "WEEK");

    DateGroupingType(int value, String name) {
        this.value = value;
        this.name = name;
    }

    public boolean equals(DateGroupingType compared) {
        return this.value() == compared.value();
    }

    public int value() {
        return value;
    }

    public String text() {
        return name;
    }

    private int value;
    private String name;
}
